﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XH.BMS.Base;

namespace XH.BMS.Models
{
    public class GroupItemModel:NotifyBase
    {
        public string Header { get; set; }
        public string CANID { get; set; }

        private double _capacitance;
        public double Capacitance
        {
            get { return _capacitance; }
            set
            {
                SetProperty(ref _capacitance, value);
                CapacitanceHistory.Add(value);
                if (CapacitanceHistory.Count > 100)
                    CapacitanceHistory.RemoveAt(0);
            }
        }

        public ObservableCollection<double> CapacitanceHistory { get; set; } = new ObservableCollection<double>();

        private double _temperature;
        public double Temperature
        {
            get { return _temperature; }
            set
            {
                SetProperty(ref _temperature, value);
                TemperatureHistory.Add(value);
                if (TemperatureHistory.Count > 100)
                    TemperatureHistory.RemoveAt(0);
            }
        }
        public ObservableCollection<double> TemperatureHistory { get; set; } = new ObservableCollection<double>();

        public List<CellModel> Cells { get; set; } = new List<CellModel>();


    }
}
